//
//  MYNewsGoodsCell.swift
//  MuYing
//
//  Created by tbb on 2019/8/6.
//  Copyright © 2019 TBB. All rights reserved.
//

import UIKit

class MYNewsGoodsCell: YQTableViewBaseCell {
    @objc @IBOutlet weak var goodsIcon: UIImageView!
    @objc @IBOutlet weak var priceLb: UILabel!
    
    @objc @IBOutlet weak var distanceLb: UILabel!
    @objc @IBOutlet weak var locationLb: UILabel!
    @objc @IBOutlet weak var titleLb: UILabel!
    //    cell.titleLb.text = @"北京酒店北京酒店北京酒店北京酒店北京酒店北京酒店北京";
    //    cell.distanceLb.text = @"位置200m";
    //    cell.priceLb.text = @"$200.00起";
    @objc var newsModel:MYNewsModel? {
        didSet {
            self.titleLb.text = self.newsModel?.title;

            self.distanceLb.text = self.newsModel?.showMi;//NSString(format: "距离您当前位置%@m", self.newsModel?.mi ?? "0") as String;
            self.priceLb.text = NSString(format: "%@", self.newsModel?.price ?? "0") as String;
            
            self.goodsIcon.setImageWith(URL(string: self.newsModel?.defaultImage ?? ""), placeholder: nil);
            
        }
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.goodsIcon.layer.cornerRadius = 8.0;
//        goodsIcon.clipsToBounds = true;
        self.locationLb.text = NSString(format: "%@“%@”", kYQLSSwift("位于"),kYQLSSwift("地理位置")) as String;
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
